Average Cost of Duval's Algorithm for Generating Lyndon Words Average Cost of Duval's Algorithm for Generating Lyndon Words
نویسندگان
چکیده
The average cost of Duval's algorithm for generating all Lyndon words up to a given length in lexicographic order is proved to be asymptotically equal to (q + 1)=(q ? 1), where q is the size of the underlying alphabet. In particular, the average cost is independent of the length of the words generated. A precise evaluation of the constants is also given.
منابع مشابه
Average Cost of Duval's Algorithm for Generating Lyndon Words
Berstel, J. and M. Pocchiola, Average cost of Duval’s algorithm for generating Lyndon words, Theoretical Computer Science 132 (1994) 415-425. The average cost of Duval’s algorithm for generating all Lyndon words up to a given length in lexicographic order is proved to be asymptotically equal to (q+ l)/(ql), where 4 is the size of the underlying alphabet. In particular, the average cost is indep...
متن کاملThe standard factorization of Lyndon words: an average point of view
A non-empty word w is a Lyndon word if and only if it is strictly smaller for the lexicographical order than any of its proper suffixes. Such a word w is either a letter or admits a standard factorization uv where v is its smallest proper suffix. For any Lyndon word v, we show that the set of Lyndon words having v as right factor of the standard factorization is regular and compute explicitly t...
متن کاملFinely homogeneous computations in free Lie algebras
We first give a fast algorithm to compute the maximal Lyndon word (with respect to lexicographic order) ofLy (A) for every given multidegree in N . We then give an algorithm to compute all the words living in Ly (A) for any given in N . The best known method for generating Lyndon words is that of Duval [1], which gives a way to go from every Lyndon word of length n to its successor (with respec...
متن کاملGenerating Lyndon brackets.: An addendum to: Fast algorithms to generate necklaces, unlabeled necklaces and irreducible polynomials over GF(2)
It is well known that the Lyndon words of length n can be used to construct a basis for the n-th homogeneous component of the free Lie algebra. We develop an algorithm that uses a dynamic programming table to efficiently generate the standard bracketing for all Lyndon words of length n, thus constructing a basis for the n-th homogeneous component of the free Lie algebra. The algorithm runs in l...
متن کاملA Fast Average Case Algorithm for Lyndon Decomposition
A simple algorithm, called LD, is described for computing the Lyndon decomposition of a word of length n. Although LD requires time O(nlogn) in the worst case, it is shown to require only (n) worst-case time for words which are \1-decomposable", and (n) average-case time for words whose length is small with respect to alphabet size. The main interest in LD resides in its application to the prob...
متن کامل